//
//  MessageWindowsViewController.m
//  WZEfengAndEtong
//
//  Created by 李旭 on 16/6/14.
//  Copyright © 2016年 wanzhao. All rights reserved.
//

#import "MessageWindowsViewController.h"
#import "SettingTextCell.h"
#import "MessageFontSettingViewController.h"
@interface MessageWindowsViewController () <UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)UITableView *tableView;
@end

@implementation MessageWindowsViewController
-(UITableView *)tableView
{
    if (_tableView == nil) {
        _tableView =[[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain];
        _tableView.backgroundColor = [UIColor clearColor];
        [self.view addSubview:_tableView];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
    return _tableView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationItem setNewTitleCenter:@"消息窗口"];
    self.view.backgroundColor = RGBCOLOR(0xf3, 0xf3, 0xf3);
    self.tableView.frame = self.view.frame;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    SettingTextCell*  textCell = [[[NSBundle mainBundle] loadNibNamed:@"SettingTextCell" owner:self options:nil] objectAtIndex:0];
    textCell.textLabel.text = @"字体大小";
    textCell.seperatorLine.hidden = YES;
    return textCell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 50;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];

    MessageFontSettingViewController *fontVc = [[MessageFontSettingViewController alloc]init];
    [self.navigationController pushViewController:fontVc animated:YES];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
